import numpy as np
import torch
import random
import math
import torch.nn.functional as F
import matplotlib.pyplot as plt
import re
import torch.nn as nn
import copy
import warnings
import copy
from pathlib import Path

c = np.array([1, 4, 8, 9, 5, 7, 3, 4])
result = np.flip(c)
print(result)  # 从输出结果来看就是变换下顺序
a = np.maximum.accumulate(c)
print(a)  # 从输出结果来看就是选出每列的最大值

print("*"*100)

b = np.array([
    [1, 2, 7, 4, 6],
    [1, 8, 7, 6, 6],
    [1, 0, 7, 3, 9],
    [1, 6, 7, 4, 4],
    [1, 2, 0, 4, 0],
])
print(b)
print("*"*100)
a = np.maximum.accumulate(b)
print(a)  # 从输出结果来看每列中的后一个值大于等于前一个值
